}
}
+if ( !function_exists( 'mb_strlen' ) ) {
+ function mb_strlen( $str, $enc = "" ) {
+ preg_match_all( '/./us', $str, $matches );
+ return count($matches);
+ }
+}
+
if ( !function_exists( 'array_diff_key' ) ) {
/**
* Exists in PHP 5.1.0+
$this->mTitle = null; # Load on demand if needed
$this->mCurrent = false;
- $this->mSize = is_null($this->mText) ? null : strlen($this->mText);
+ $this->mSize = is_null($this->mText) ? null : mb_strlen($this->mText);
} else {
throw new MWException( 'Revision constructor passed invalid row format.' );
}
'rev_user_text' => $this->mUserText,
'rev_timestamp' => $dbw->timestamp( $this->mTimestamp ),
'rev_deleted' => $this->mDeleted,
- 'rev_len' => strlen($this->mText),
+ 'rev_len' => mb_strlen($this->mText),
), $fname
);